package com.cg.controller;

import com.cg.client.SystemClient;
import com.cg.dto.Result;
import com.cg.entity.Dictionary;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName DictController
 * @Description TODO
 * @Author CG
 * @Date 2023/12/1 11:02
 **/
@RestController
@RequestMapping("/dict")
public class DictController {

    @Resource
    private SystemClient systemClient;

    /**
     * 根据type表的typeCode查询Dictionary类型
     */
    @PostMapping("/queryDicByTypeCode")
    public Result<List<Dictionary>> queryDicByTypeCode(String typeCode){
        return systemClient.queryDicByTypeCode(typeCode);
    }
}
